# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Christopher Reimer <mail@c-reimer.de>
# Contributor: Dimitris Kiziridis <ragouel@outlook.com>
# Contributor: Dan Beste <dan.ray.beste@gmail.com>
# Contributor: Carl George <carl@george.computer>

pkgname=pop-gtk-theme
pkgver=5.5.1.r2.e09de355
pkgrel=1
pkgdesc='System76 Pop GTK+ Theme'
arch=(any)
url=https://github.com/pop-os/gtk-theme
license=(
  CCPL
  GPL3
  LGPL2.1
  LGPL3
)
makedepends=(
  git
  meson
  sassc
)
optdepends=(
  'gtk-engine-murrine: GTK2 theme'
  'gtk-engine-pixbuf: GTK2 theme'
  'ttf-fira-mono: Monospace font'
  'ttf-fira-sans: Interface font'
  'ttf-roboto-slab: Document font'
)
_commit=e09de3554797f800f46e97db65599fae364f99a2
source=(pop-gtk-theme::git+https://github.com/pop-os/gtk-theme.git#commit=${_commit})
b2sums=(SKIP)

pkgver() {
  cd pop-gtk-theme
  git describe --tags | sed 's/^v//;s/-/.r/;s/-g/./'
}

build() {
  arch-meson pop-gtk-theme build
  meson compile -C build
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  # https://github.com/pop-os/gtk-theme/issues/436
  ln -s /usr/share/gnome-shell/theme/Pop-dark "${pkgdir}"/usr/share/themes/Pop-dark/gnome-shell
}

# vim: ts=2 sw=2 et:
